Skip to main content

NestWhileList

NestWhileList[f,expr,test] generates a list of the results of applying f repeatedly, starting with expr, and continuing until applying test to the result no longer yields True. 

NestWhileList[f,expr,test,m] supplies the most recent m results as arguments for test at each step.

NestWhileList[f,expr,test,All] supplies all results so far as arguments for test at each step.

NestWhileList[f,expr,test,m,max] applies f at most max times.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.